package com.yunpeng.aidevice.dao.mapper.entity;

import com.yunpeng.aidevice.dao.mapper.IEntityMapper;
import com.yunpeng.aidevice.dao.model.entity.PermissionDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author hemw
 * @since 2020-04-07
 */
@Mapper
public interface PermissionMapper extends IEntityMapper<PermissionDO> {


    /**
     * 根据代码集合查询有效的权限集合
     *
     * @param codes
     * @return
     */
    List<PermissionDO> queryEffectivePermissionListByCode(@Param("codes") List<String> codes);

    /**
     * 根据代码集合查询权限集合
     *
     * @param codes
     * @return
     */
    List<PermissionDO> queryPermissionListByCode(@Param("codes") List<String> codes);
}
